package com.mycity.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.ResultSetExtractor;

import com.mycity.bean.Comment;

public class CommentSetExtractor implements ResultSetExtractor<Comment> {

	  @Override
	  public Comment extractData(ResultSet rs) throws SQLException {
	    Comment Comment = new Comment();
	    Comment.setUserId(rs.getInt("userId"));
	    Comment.setPostId(rs.getInt("postId"));
	    Comment.setCommentId(rs.getInt("CommentId"));
	    Comment.setCommentDate(rs.getString("CommentDate"));
	    Comment.setCommentContent(rs.getString("CommentContent"));
	    Comment.setHasStar(rs.getInt("hasStar"));
	    return Comment;
	  }
}